import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

// @ts-ignore
import App from './App.vue'
import router from './router'

// 注册ElementPlus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//import locale from 'element-plus/lib/locale/lang/zh-cn'// 因element-plus默认是英文，我们指定一下默认中文  ☆☆ 报错
import locale from "element-plus/es/locale/lang/zh-cn";

// 图标并进行全局注册
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)

// 注册ElementPlus
app.use(ElementPlus, {
    locale // 语言设置
    // size: Cookies.get('size') || 'medium' // 设置默认尺寸
})
// 注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}


app.use(createPinia())
app.use(router)

app.mount('#app')
